package com.icecola.d1_file;

import java.io.File;

public class Test {
    public static void main(String[] args) {
        // 改变某个文件夹下文件的序号
        File dir = new File("D:\\resource");
        File[] txts = dir.listFiles();
        for (File txt : txts) {
            String name = txt.getName();
            String s = name.substring(0, 1) + 19;
            String newName = s + ".txt";
            txt.renameTo(new File(dir, newName));
        }
    }
}
